#! /bin/bash

if [ -n "$1"  ] ; then
    data_date="$1"
else
    data_date=$(date -d "-1 days" +%F)
fi

load_data="LOAD DATA INPATH '/warehouse/app_basic/t_md_areas/$data_date' OVERWRITE  INTO TABLE jtp_app_ods.ods_md_areas
               PARTITION (dt = '$data_date');"

/opt/module/spark/bin/beeline -u jdbc:hive2://node101:10001 -n bwie  -e "${load_data}"







